﻿using ELab.Serialization;
using ELab.Serialization.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ELab.Communication.Messages.ControllerMessages
{
    public class GetSurveysResponseMessage : ControlMessage
    {
        /// <summary>
        /// Gets MessageTypeId for GetApplicationListResponseMessage.
        /// </summary>
        public override int MessageTypeId
        {
            get { return ControlMessageFactory.MessageTypeIdGetSurveysResponseMessage; }
        }

        public Survey[] Surveys { get; set; }

        public override void Serialize(IELabSerializer serializer)
        {
            base.Serialize(serializer);
            serializer.WriteObjectArray(Surveys);
        }

        public override void Deserialize(IELabDeserializer deserializer)
        {
            base.Deserialize(deserializer);
            Surveys = deserializer.ReadObjectArray(() => new Survey());
        }
    }
}